<?php if(!isset($_GET['listRequest'])){ ?>
<div class="panel"  data-position="top" data-intro="在这里查看和发布临时任务">
    <div class="panel-heading">兼职任务
        <if condition="getAccessMenu($accessList, 'Intesys', 'Task_daily', 'change')">
        <span class="pull-right" style="cursor:pointer" onclick="_openWindow('{:U('Task_daily/change')}', 800, '发布临时任务', '确认',  function(){ $('#tempTaskboxform').submit();$('#tempDoneform').submit();return true;}, '')">发布兼职</span>
        </if>
    </div>
    <div class="panel-body">
        <div class="widget-container scrollable list task-widget padded">
            <div class="widget-content "  id="tempTaskbox">
                <?php } ?>
                <ul style="margin-bottom: 0;">
                <?php if(isset($_GET['listRequest'])){
                $alltask=count($tempTaskbox);$done=0;$undone=0; ?>
                <?php foreach($temptask as $v){ ?>
                <li onClick="_openWindow('{:U('Task_daily/tempview',['id'=>$v['id']])}',650, '查看任务','确认',  function(){   $('#tempTaskboxform').submit();return true;},'')" >
                    <label style="padding-right:0;">
                        <i class="  fa icon-angle-right"></i> {$v['title']} <small><?php echo $v['detail'] ?></small>
                        <span class="pull-right">
                            <div class="label label-warning pull-right">
                                <?php echo empty($v['proposername'])?'未领取':'已领取' ; ?>
                            </div>
                            <div class="pull-right text-muted" style="font-weight:normal">
                                <?php echo empty($v['proposername'])?'':'领取人：'.$v['proposername'] ; ?>
                                &nbsp;&nbsp;
                            </div>
                        </span>
                    </label>
                </li>
                <?php }};   ?>
                 </ul>
                <?php if(!isset($_GET['listRequest'])){?>
            </div>
            <div id="tempTaskboxpages" class="text-center"></div>
            <form action="<?php echo U('');?>" id="tempTaskboxform"><input type="hidden" name="listRequest" value="1"></form>
        </div>
    </div>
</div>
<style>
    #tempTaskbox li{list-style: none;}
</style>
<script>
	$('#tempTaskbox').ajaxlist({append:false,success:function(){},nodata:'<li style="text-align: center">暂无兼职可领</li>'});
</script>
<?php } ?>
